package StudyCode.summary.myfile;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CopyFileWithFileInputStreamAndFileOutputStream {
	public static void main(String[] args) throws IOException {

		try (FileInputStream in = new FileInputStream("E:\\迅雷下载\\test1.txt");
		     FileOutputStream out = new FileOutputStream("E:\\Copy\\test1.txt")) {
			int c;
			while ((c = in.read()) != -1) {
				out.write(c);
			}
			System.out.println("复制成功。");
		}
	}
}
